package com.octopus.io;

import java.io.IOException;

import java.io.InputStream;
import java.io.OutputStream;

public class IOUtils {
	public static boolean inputStreamToOutputStream(InputStream is, OutputStream os) throws IOException{
		if(is == null || os == null){
			return false;
		}
		byte[] buffer = new byte[65536];
		int count = is.read(buffer);
		while(count > 0){
			os.write(buffer, 0, count);
			count = is.read(buffer);
		}
		return true;
	}
}
